home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Secrets 4 / Hacker's Secrets 4.iso / faq / comp2305.txt < prev    next >
Text File  |  1997-01-06  |  21KB  |  498 lines

  1. Subject: computer-security/sniffers FAQ
  2. Supersedes: <secfaq.p3_850416605@iss.net>
  3. Date: 27 Dec 1996 18:12:32 GMT
  4. misc:26490 comp.os.ms-windows.nt.admin.networking:28570
  5.  
  6. Posting-frequency: monthly
  7. Version: 3.00
  8.  
  9. Sniffer FAQ
  10.  
  11. Version: 3.00
  12. ----------------------------------------------------------------------------
  13. This Security FAQ is a resource provided by:
  14.  
  15.      Internet Security Systems, Inc.
  16.      Suite 660, 41 Perimeter Center East          Tel: (770) 395-0150
  17.      Atlanta, Georgia 30346                       Fax: (770) 395-1972
  18.  
  19. ----------------------------------------------------------------------------
  20. To get the newest updates of Security files check the following services:
  21.  
  22.      http://www.iss.net/
  23.      ftp ftp.iss.net /pub/
  24.  
  25. To subscibe to the update mailing list, Alert, send an e-mail to
  26. request-alert@iss.net and, in the text of your message (not the subject
  27. line), write:
  28.  
  29.      subscribe alert
  30.  
  31. ----------------------------------------------------------------------------
  32. This Sniffer FAQ will hopefully give administrators a clear understanding of
  33. sniffing problems and hopefully possible solutions to follow up with.
  34. Sniffers is one of the main causes of mass break-ins on the Internet today.
  35.  
  36. This FAQ will be broken down into:
  37.  
  38.    * What a sniffer is and how it works
  39.    * Where are sniffers available
  40.    * How to detect if a machine is being sniffed
  41.    * Stopping sniffing attacks:
  42.         o Active hubs
  43.         o Encryption
  44.         o Kerberos
  45.         o One-time password technology
  46.         o Non-promiscuous interfaces
  47.  
  48. ----------------------------------------------------------------------------
  49.  
  50. What a sniffer is and how it works
  51.  
  52. Unlike telephone circuits, computer networks are shared communication
  53. channels. It is simply too expensive to dedicate local loops to the switch
  54. (hub) for each pair of communicating computers. Sharing means that computers
  55. can receive information that was intended for other machines. To capture the
  56. information going over the network is called sniffing.
  57.  
  58. Most popular way of connecting computers is through ethernet. Ethernet
  59. protocol works by sending packet information to all the hosts on the same
  60. circuit. The packet header contains the proper address of the destination
  61. machine. Only the machine with the matching address is suppose to accept the
  62. packet. A machine that is accepting all packets, no matter what the packet
  63. header says, is said to be in promiscuous mode.
  64.  
  65. Because, in a normal networking environment, account and password
  66. information is passed along ethernet in clear-text, it is not hard for an
  67. intruder once they obtain root to put a machine into promiscuous mode and by
  68. sniffing, compromise all the machines on the net.
  69.  
  70. ----------------------------------------------------------------------------
  71.  
  72. Where are sniffers available
  73.  
  74. Sniffing is one of the most popular forms of attacks used by hackers. One
  75. special sniffer, called Esniff.c, is very small, designed to work on Sunos,
  76. and only captures the first 300 bytes of all telnet, ftp, and rlogin
  77. sessions. It was published in Phrack, one of the most widely read freely
  78. available underground hacking magazines. You can find Phrack on many FTP
  79. sites. Esniff.c is also available on many FTP sites such as
  80. coombs.anu.edu.au:/pub/net/log.
  81.  
  82. You may want to run Esniff.c on an authorized network to quickly see how
  83. effective it is in compromising local machines.
  84.  
  85. Other sniffers that are widely available which are intended to debug network
  86. problems are:
  87.  
  88.    * RealSecure (real time monitoring, attack recognition and response) on
  89.      SunOs 4.1.x, Solaris 2.5, and Linux. Available at
  90.      http://www.iss.net/RealSecure
  91.    * Etherfind on SunOs4.1.x
  92.    * Snoop on Solaris 2.x and SunOs 4.1 (on ftp playground.sun.com)
  93.    * Tcpdump 3.0 uses bpf for a multitude of platforms.
  94.    * Packetman, Interman, Etherman, Loadman works on the following
  95.      platforms:
  96.      SunOS, Dec-Mips, SGI, Alpha, and Solaris. It is available on
  97.      ftp.cs.curtin.edu.au:/pub/netman/[sun4c|dec-mips|sgi|alpha|solaris2]/
  98.      [etherman-1.1a|interman-1.1|loadman-1.0|packetman-1.1].tar.Z
  99.      Packetman was designed to capture packets, while Interman, Etherman,
  100.      and Loadman monitor traffic of various kinds.
  101.  
  102.      DOS based sniffers
  103.  
  104.    * Gobbler for IBM DOS Machines
  105.    * ethdump v1.03
  106.      Available on ftp
  107.      ftp.germany.eu.net:/pub/networking/inet/ethernet/ethdp103.zip
  108.    * ethload v1.04
  109.      Companion utility to a ethernet monitor. Available on ftp
  110.      ftp.germany.eu.net:/pub/networking/monitoring/ethload/ethld104.zip
  111.  
  112. Commercial Sniffers are available at:
  113.  
  114.    * Klos Technologies, Inc.
  115.  
  116.           PacketView - Low cost network protocol analyzer
  117.  
  118.           Phone: 603-424-8300
  119.           BBS: 603-429-0032
  120.  
  121.    * Network General.
  122.  
  123.           Network General produces a number of products. The most
  124.           important are the Expert Sniffer, which not only sniffs on
  125.           the wire, but also runs the packet through a high-performance
  126.           expert system, diagnosing problems for you. There is an
  127.           extension onto this called the "Distributed Sniffer System"
  128.           that allows you to put the console to the expert sniffer on
  129.           you Unix workstation and to distribute the collection agents
  130.           at remote sites.
  131.  
  132.    * Microsoft's Net Monitor
  133.  
  134.           " My commercial site runs many protocols on one wire -
  135.           NetBeui, IPX/SPX, TCP/IP, 802.3 protocols of various flavors,
  136.           most notably SNA. This posed a big problem when trying to
  137.           find a sniffer to examine the network problems we were
  138.           having, since I found that some sniffers that understood
  139.           Ethernet II parse out some 802.3 traffic as bad packets, and
  140.           vice versa. I found that the best protocol parser was in
  141.           Microsoft's Net Monitor product, also known as Bloodhound in
  142.           its earlier incarnations. It is able to correctly identify
  143.           such oddities as NetWare control packets, NT NetBios name
  144.           service broadcasts, etc, which etherfind on a Sun simply
  145.           registered as type 0000 packet broadcasts. It requires MS
  146.           Windows 3.1 and runs quite fast on a HP XP60 Pentium box. Top
  147.           level monitoring provides network statistics and information
  148.           on conversations by mac address (or hostname, if you bother
  149.           with an ethers file). Looking at tcpdump style details is as
  150.           simple as clicking on a conversation. The filter setup is
  151.           also one of the easiest to implement that I've seen, just
  152.           click in a dialog box on the hosts you want to monitor. The
  153.           number of bad packets it reports on my network is a tiny
  154.           fraction of that reported by other sniffers I've used. One of
  155.           these other sniffers in particular was reporting a large
  156.           number of bad packets with src mac addresses of
  157.           aa:aa:aa:aa:aa:aa but I don't see them at all using the MS
  158.           product. - Anonymous
  159.  
  160. ----------------------------------------------------------------------------
  161.  
  162. How to detect a sniffer running.
  163.  
  164. To detect a sniffing device that only collects data and does not respond to
  165. any of the information, requires physically checking all your ethernet
  166. connections by walking around and checking the ethernet connections
  167. individually.
  168.  
  169. It is also impossible to remotely check by sending a packet or ping if a
  170. machine is sniffing.
  171.  
  172. A sniffer running on a machine puts the interface into promiscuous mode,
  173. which accepts all the packets. On some Unix boxes, it is possible to detect
  174. a promiscuous interface. It is possible to run a sniffer in non-promiscuous
  175. mode, but it will only capture sessions from the machine it is running on.
  176. It is also possible for the intruder to do similiar capture of sessions by
  177. trojaning many programs such as sh, telnet, rlogin, in.telnetd, and so on to
  178. write a log file of what the user did. They can easily watch the tty and
  179. kmem devices as well. These attacks will only compromise sessions coming
  180. from that one machine, while promiscuous sniffing compromises all sessions
  181. on the ethernet.
  182.  
  183. For SunOs, NetBSD, and other possible BSD derived Unix systems, there is a
  184. command
  185.  
  186.      "ifconfig -a"
  187.  
  188. that will tell you information about all the interfaces and if they are in
  189. promiscuous mode. DEC OSF/1 and IRIX and possible other OSes require the
  190. device to be specified. One way to find out what interface is on the system,
  191. you can execute:
  192.  
  193.      # netstat -r
  194.      Routing tables
  195.  
  196.      Internet:
  197.      Destination      Gateway            Flags     Refs     Use  Interface
  198.      default          iss.net            UG          1    24949  le0
  199.      localhost        localhost          UH          2       83  lo0
  200.  
  201. Then you can test for each interface by doing the following command:
  202.  
  203.      #ifconfig le0
  204.      le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,MULTICAST>
  205.              inet 127.0.0.1 netmask 0xffffff00 broadcast 255.0.0.1
  206.  
  207. Intruders often replace commands such as ifconfig to avoid detection. Make
  208. sure you verify its checksum.
  209.  
  210. There is a program called cpm available on ftp.cert.org:/pub/tools/cpm that
  211. only works on Sunos and is suppose to check the interface for promiscuous
  212. flag.
  213.  
  214. Ultrix can possibly detect someone running a sniffer by using the commands
  215. pfstat and pfconfig.
  216.  
  217. pfconfig allows you to set who can run a sniffer
  218. pfstat shows you if the interface is in promiscuous mode.
  219.  
  220. These commands only work if sniffing is enabled by linking it into the
  221. kernel. by default, the sniffer is not linked into the kernel. Most other
  222. Unix systems, such as Irix, Solaris, SCO, etc, do not have any flags
  223. indication whether they are in promiscuous mode or not, therefore an
  224. intruder could be sniffing your whole network and there is no way to detect
  225. it.
  226.  
  227. Often a sniffer log becomes so large that the file space is all used up. On
  228. a high volume network, a sniffer will create a large load on the machine.
  229. These sometimes trigger enough alarms that the administrator will discover a
  230. sniffer. I highly suggest using lsof (LiSt Open Files) available from
  231. coast.cs.purdue.edu:/pub/Purdue/lsof for finding log files and finding
  232. programs that are accessing the packet device such as /dev/nit on SunOs.
  233.  
  234. There is no commands I know of to detect a promiscuous IBM PC compatible
  235. machine, but they atleast usually do not allow command execution unless from
  236. the console, therefore remote intruders can not turn a PC machine into a
  237. sniffer without inside assistance.
  238.  
  239. ----------------------------------------------------------------------------
  240.  
  241. Stopping sniffing attacks
  242.  
  243. Active hubs send to each system only packets intended for it rendering
  244. promiscuous sniffing useless. This is only effective for 10-Base T.
  245.  
  246. The following vendors have available active hubs:
  247.  
  248.    * Cisco
  249.    * 3Com
  250.    * HP
  251.  
  252. ----------------------------------------------------------------------------
  253.  
  254. Encryption
  255.  
  256. There are several packages out there that allow encryption between
  257. connections therefore an intruder could capture the data, but could not
  258. decypher it to make any use of it.
  259.  
  260. Some packages available are:
  261.  
  262.    * ssh is available at http://www.cs.hut.fi/ssh/ssh-archive/ .
  263.  
  264.    * deslogin is one package available at ftp
  265.      coast.cs.purdue.edu:/pub/tools/unix/deslogin .
  266.  
  267.    * swIPe is another package available at
  268.      ftp.csua.berkeley.edu:/pub/cypherpunks/swIPe/
  269.  
  270.    * Netlock encrypts all (tcp, udp, and raw ip based) communications
  271.      transparently. It has automatic (authenticated Diffie-Helman)
  272.      distibuted key management mechanism for each host and runs on the SUN
  273.      4.1 and HP 9.x systems. The product comes with a Certification
  274.      Authority Management application which generates host certificates
  275.      (X.509) used for authentication between the hosts. and provides
  276.      centralized control of each Hosts communications rules.
  277.  
  278.      The product is built by Hughes Aircraft and they can be reached at
  279.      800-825-LOCK or email at netlock@mls.hac.com.
  280.  
  281. ----------------------------------------------------------------------------
  282.  
  283. Kerberos
  284.  
  285. Kerberos is another package that encrypts account information going over the
  286. network. Some of its draw backs are that all the account information is held
  287. on one host and if that machine is compromised, the whole network is
  288. vulnerable. It is has been reported a major difficulty to set up. Kerberos
  289. comes with a stream-encrypting rlogind, and stream-encrypting telnetd is
  290. available. This prevents intruders from capturing what you did after you
  291. logged in.
  292.  
  293. There is a Kerberos FAQ at ftp at rtfm.mit.edu in
  294. /pub/usenet/comp.protocols/kerberos/Kerberos_Users__Frequently_Asked_Questions_1.11
  295. or try: ftp://aeneas.mit.edu/pub/kerberos/doc/KERBEROS.FAQ
  296.  
  297. ----------------------------------------------------------------------------
  298.  
  299. One time password technology
  300.  
  301. S/key and other one time password technology makes sniffing account
  302. information almost useless. S/key concept is having your remote host already
  303. know a password that is not going to go over insecure channels and when you
  304. connect, you get a challenge. You take the challenge information and
  305. password and plug it into an algorithm which generates the response that
  306. should get the same answer if the password is the same on the both sides.
  307. Therefore the password never goes over the network, nor is the same
  308. challenge used twice. Unlike SecurID or SNK, with S/key you do not share a
  309. secret with the host. S/key is available on
  310. ftp:thumper.bellcore.com:/pub/nmh/skey
  311.  
  312. OPIE is the successor of Skey and is available at
  313. ftp://ftp.nrl.navy.mil/pub/security/nrl-opie/
  314.  
  315. Other one time password technology is card systems where each user gets a
  316. card that generates numbers that allow access to their account. Without the
  317. card, it is improbable to guess the numbers.
  318.  
  319. The following are companies that offer solutions that are provide better
  320. password authenication (ie, handheld password devices):
  321.  
  322. Secure Net Key (SNK)
  323.  
  324. Digital Pathways, Inc.
  325. 201 Ravendale Dr. Mountainview, Ca.
  326. 97703-5216 USA
  327.  
  328. Phone: 415-964-0707 Fax: (415) 961-7487
  329.  
  330. SecurID
  331.  
  332. Security Dynamics,
  333. One Alewife Center
  334. Cambridge, MA 02140-2312
  335. USA Phone: 617-547-7820
  336. Fax: (617) 354-8836
  337. SecurID uses time slots as authenication rather than challenge/response.
  338.  
  339. ArKey and OneTime Pass
  340.  
  341. Management Analytics
  342. PO Box 1480
  343. Hudson, OH 44236
  344. Email: fc@all.net
  345. Tel:US+216-686-0090 Fax: US+216-686-0092
  346.  
  347. OneTime Pass (OTP):
  348. This program provides unrestricted one-time pass codes on a user by user
  349. basis without any need for cryptographic protocols or hardware devices. The
  350. user takes a list of usable pass codes and scratches out each one as it is
  351. used. The system tracks usage, removing each passcode from the available
  352. list when it is used. Comes with a very small and fast password tester and
  353. password and pass phrase generation systems.
  354.  
  355. ArKey:
  356. This is the original Argued Key system that mutually authenticates users and
  357. systems to each other based on their common knowledge. No hardware
  358. necessary. Comes with a very small and fast password tester and password and
  359. pass phrase generation systems.
  360.  
  361. WatchWord and WatchWord II
  362.  
  363. Racal-Guardata
  364. 480 Spring Park Place
  365. Herndon, VA 22070
  366. 703-471-0892
  367. 1-800-521-6261 ext 217
  368.  
  369. CRYPTOCard
  370.  
  371. Arnold Consulting, Inc.
  372. 2530 Targhee Street, Madison, Wisconsin
  373. 53711-5491 U.S.A.
  374. Phone : 608-278-7700 Fax: 608-278-7701
  375. Email: Stephen.L.Arnold@Arnold.Com
  376. CRYPTOCard is a modern, SecureID-sized, SNK-compatible device.
  377.  
  378. SafeWord
  379.  
  380. Enigma Logic, Inc.
  381. 2151 Salvio #301
  382. Concord, CA 94520
  383. 510-827-5707 Fax: (510)827-2593
  384. For information about Enigma ftp to: ftp.netcom.com in directory
  385. /pub/sa/safeword
  386.  
  387. Secure Computing Corporation:
  388.  
  389. 2675 Long Lake Road
  390. Roseville, MN 55113
  391. Tel: (612) 628-2700
  392. Fax: (612) 628-2701
  393. debernar@sctc.com
  394.  
  395. ----------------------------------------------------------------------------
  396.  
  397. Non-promiscuous Interfaces
  398.  
  399. You can try to make sure that most IBM DOS compatible machines have
  400. interfaces that will not allow sniffing. Here is a list of cards that do not
  401. support promiscuous mode:
  402.  
  403. Test the interface for promiscuous mode by using the Gobbler. If you find a
  404. interface that does do promiscuous mode and it is listed here, please e-mail
  405. cklaus@iss.net so I can remove it ASAP.
  406.  
  407.      IBM Token-Ring Network PC Adapter
  408.      IBM Token-Ring Network PC Adapter II (short card)
  409.      IBM Token-Ring Network PC Adapter II (long card)
  410.      IBM Token-Ring Network 16/4 Adapter
  411.      IBM Token-Ring Network PC Adapter/A
  412.      IBM Token-Ring Network 16/4 Adapter/A
  413.      IBM Token-Ring Network 16/4 Busmaster Server Adapter/A
  414.  
  415. The following cards are rumoured to be unable to go into promiscuous mode,
  416. but that the veracity of those rumours is doubtful.
  417.  
  418.      Microdyne (Excelan) EXOS 205
  419.      Microdyne (Excelan) EXOS 205T
  420.      Microdyne (Excelan) EXOS 205T/16
  421.      Hewlett-Packard 27250A EtherTwist PC LAN Adapter Card/8
  422.      Hewlett-Packard 27245A EtherTwist PC LAN Adapter Card/8
  423.      Hewlett-Packard 27247A EtherTwist PC LAN Adapter Card/16
  424.      Hewlett-Packard 27248A EtherTwist EISA PC LAN Adapter Card/32
  425.      HP 27247B EtherTwist Adapter Card/16 TP Plus
  426.      HP 27252A EtherTwist Adapter Card/16 TP Plus
  427.      HP J2405A EtherTwist PC LAN Adapter NC/16 TP
  428.  
  429. Adapters based upon the TROPIC chipset generally do not support promiscuous
  430. mode. The TROPIC chipset is used in IBM's Token Ring adapters such as the
  431. 16/4 adapter. Other vendors (notably 3Com) also supply TROPIC based
  432. adapters. TROPIC-based adapters do accept special EPROMs, however, that will
  433. allow them to go into promiscuous mode. However, when in promiscuous mode,
  434. these adapters will spit out a "Trace Tool Present" frame.
  435.  
  436. ----------------------------------------------------------------------------
  437.  
  438. Acknowledgements
  439.  
  440. I would like to thank the following people for the contribution to this FAQ
  441. that has helped to update and shape it:
  442.  
  443.    * Padgett Peterson (padgett@tccslr.dnet.mmc.com)
  444.    * Steven Bellovin (smb@research.att.com)
  445.    * Wietse Venema (wietse@wzv.win.tue.nl)
  446.    * Robert D. Graham (robg@NGC.COM)
  447.    * Kevin Martinez (kevinm@beavis.qntm.com)
  448.    * Frederick B. Cohen (fc@all.net)
  449.    * James Bonfield (jkb@mrc-lmb.cam.ac.uk)
  450.    * Marc Horowitz (marc@MIT.EDU)
  451.    * Steve Edwards (steve@newline.com)
  452.    * Andy Poling (Andy.Poling@jhu.edu)
  453.    * Jeff Collyer (jeff@cnet-pnw.com)
  454.    * Sara Gordon (sgordon@sun1.iusb.indiana.edu)
  455.  
  456. ----------------------------------------------------------------------------
  457.  
  458. Copyright
  459.  
  460. This paper is Copyright (c) 1994, 1995, 1996
  461.    by Christopher Klaus of Internet Security Systems, Inc.
  462.  
  463. Permission is hereby granted to give away free copies electronically. You
  464. may distribute, transfer, or spread this paper electronically. You may not
  465. pretend that you wrote it. This copyright notice must be maintained in any
  466. copy made. If you wish to reprint the whole or any part of this paper in any
  467. other medium excluding electronic medium, please ask the author for
  468. permission.
  469.  
  470. Disclaimer
  471.  
  472. The information within this paper may change without notice. Use of this
  473. information constitutes acceptance for use in an AS IS condition. There are
  474. NO warranties with regard to this information. In no event shall the author
  475. be liable for any damages whatsoever arising out of or in connection with
  476. the use or spread of this information. Any use of this information is at the
  477. user's own risk.
  478.  
  479. Address of Author
  480.  
  481. Please send suggestions, updates, and comments to:
  482. Christopher Klaus <cklaus@iss.net> of Internet Security Systems, Inc.
  483. <iss@iss.net>
  484.  
  485. Internet Security Systems, Inc.
  486.  
  487. ISS is the leader in network security tools and technology through
  488. innovative audit, correction, and monitoring software. The Atlanta-based
  489. company's flagship product, Internet Scanner, is the leading commercial
  490. attack simulation and security audit tool. The Internet Scanner SAFEsuite is
  491. based upon ISS' award-winning Internet Scanner and was specifically designed
  492. with expanded capabilities to assess a variety of network security issues
  493. confronting web sites, firewalls, servers and workstations. The Internet
  494. Scanner SAFEsuite is the most comprehensive security assessment tool
  495. available. For more information about ISS or its products, contact the
  496. company at (770) 395-0150 or e-mail at iss@iss.net. ISS maintains a Home
  497. Page on the World Wide Web at http://www.iss.net
  498.